/**
 * api list
 */
import AppConfig from './index.js';
import { request } from '../utils/index.js';
const host = AppConfig.server.host //手动指定域名
const RootUrl = `${host}`

export const Api = {
    host: `${RootUrl}`,
    getUserSig: `${RootUrl}/api/v1/index/getUserSig`,//获取userId和userSig
    // Auth
    login: `${RootUrl}/public/login`,
    register: `${RootUrl}/public/rigister`,
    getMsgCode: `${RootUrl}/public/sendSme`,
    getInviteCode: `${RootUrl}/public/hashcode`,
    getOpenid: `${RootUrl}/public/openid`, //获取openid
    updataPass: `${RootUrl}/public/fixPwd`,
    


    // index

    getSwipeList: `${RootUrl}/pt/bannerList`,
    // cart
    getMyCart: `${RootUrl}/goods/myCart`,
    addCart: `${RootUrl}/goods/addCart`,
    editCart: `${RootUrl}/goods/editCart`,
    delCart: `${RootUrl}/goods/delCart`,
    cartAll: `${RootUrl}/goods/cartAll`,



    // 领养商品详情
    getGoodDetails: `${RootUrl}/goods/goodsDetails`,

    // 千禧学堂
    qxSchoolIndex: `${RootUrl}/shool/index`,

    // 商城
    goodListType: {
        RECOMMAND: '1',
        VIP: '2',
        GIFT_CARD_ZONE: '3',
        GIFT_CARD: '4,12',
        GIFT_CARD_SHOP: '5',
        ADOPT: '6',
        SHEEP_MEET_STORE: '7',
        EXCHANGE_RED_WINE: '8'
    },

    //   商品列表
    getGoodList: `${RootUrl}/goods/lists`,
    //商品立即购买 去结算按钮
    order: `${RootUrl}/goods/order`,
    //单个 运费
    confirmOrder: `${RootUrl}/goods/confirmOrder`,
    // 多个商品运费
    confirmCartAll: `${RootUrl}/goods/confirmCartAll`,
    // 地址
    addNewAddress: `${RootUrl}/Address/addAddress`,
    getAddressList: `${RootUrl}/address/addressList`,
    delAddress: `${RootUrl}/Address/delAddress`,
    //设置默认地址
    tacitly: `${RootUrl}/address/setaddress`,

    // 获取支付参数
    getWXPayOptions: `${RootUrl}/goods/goodsPay`,
    //获取羊贝
    userAssets: `${RootUrl}/user/userAssets`,

    //   获取抽奖列表
    getlucklist: `${RootUrl}/goods/luck_list`,
    getluck: `${RootUrl}/goods/luck`,

    // 羊币
    xfCoin: `${RootUrl}/user/xfCoin`,
    //领养
    sheepOrder: `${RootUrl}/sleep/sheepOrder`,
    sheepSite: `${RootUrl}/sleep/sheepSite`,

    sheep_coin: `${RootUrl}/user/sheep_coin`,
    //   抵扣羊币
    paySleepCoin: `${RootUrl}/user/paySleepCoin`,

    //   接收礼品卡
    accept: `${RootUrl}/goods/accept`,
    //  我的礼品卡
    giftCart: `${RootUrl}/goods/giftCart`,

    //  兑换礼品卡
    exchange: `${RootUrl}/goods/exchange`,


    //  今日签到
    sign: `${RootUrl}/user/sign`,
    //羊贝抵扣
    sheepB: `${RootUrl}/sleep/sheepB`
};